package com.shop.api.feign;

import com.shop.Result.LdbzResult;
import com.shop.pojo.LdbzSearchSlideAd;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "shop-service-admin")
public interface AdminSearchSlideAdFeign {

    //修改页面跳转
    @RequestMapping(value = "/admin/searchS/service/editSearchSliedeAd/{id}",method = RequestMethod.GET)
    LdbzResult editSearchSlideAd(@RequestParam("id")long id);

    //分页获取检索页滑动广告
    @RequestMapping(value = "/admin/searchS/service/getSearchSlideAdPage",method = RequestMethod.GET)
    LdbzResult getSearchSlideAdPage(@RequestParam("entity") LdbzSearchSlideAd entity, @RequestParam("page")int page, @RequestParam("limit")int limit);

    //获取广告的详细信息
    @RequestMapping(value = "/admin/searchS/service/selectByKey/{id}",method = RequestMethod.GET)
    LdbzResult selectByKey(@RequestParam("id")long id);

    //删除广告
    @RequestMapping(value = "/admin/searchS/service/deleteByKey/{id}",method = RequestMethod.GET)
    LdbzResult deleteByKey(@RequestParam("id")String id);

    //新增广告
    @RequestMapping(value = "/admin/searchS/service/insertByEntity",method = RequestMethod.GET)
    LdbzResult insertByEntity(@RequestParam("entity")LdbzSearchSlideAd entity);

    //修改广告
    @RequestMapping(value = "/admin/searchS/service/updateByKey")
    LdbzResult updateByKey(@RequestParam("entity")LdbzSearchSlideAd entity);
}
